<?php namespace App\Services;

use App\Facades\Infra\CollectionManager;
use Auth;

class CollectionService{

	public function addCollection($data){

		$data['customer_id'] = Auth::user()->id;

		CollectionManager::addCollection($data);
	}

	public function getCollection(){
		$conditions = [
			'customer_id' => Auth::user()->id
		];

		return CollectionManager::getCollections($conditions,false);
	}

	public function updateCollection($data){

		$colection = $this->getCollection();

		CollectionManager::updateCollection($colection,$data);
	}
}